<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: nano_engine/core.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_416dcb43af7fcdc1a2eacec9468204be.html">nano_engine</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">core.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="core_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    MIT License</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    Copyright (c) 2018-2019, Alexey Dynda</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">    in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">    The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">    SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifndef _NANO_ENGINE_CORE_H_</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#define _NANO_ENGINE_CORE_H_</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="tiler_8h.html">tiler.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="canvas_8h.html">canvas.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">   41</a></span>&#160;<span class="keyword">typedef</span> uint8_t (*<a class="code" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">TNanoEngineGetButtons</a>)(void);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="core_8h.html#a9f670b824fb6b10883cd4283f800310f">   44</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="core_8h.html#a9f670b824fb6b10883cd4283f800310f">TLoopCallback</a>)(void);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">enum</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;{</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    BUTTON_NONE   = 0B00000000,</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    BUTTON_DOWN   = 0B00000001,</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    BUTTON_LEFT   = 0B00000010,</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    BUTTON_RIGHT  = 0B00000100,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    BUTTON_UP     = 0B00001000,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    BUTTON_A      = 0B00010000,</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    BUTTON_B      = 0B00100000,</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;};</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="class_nano_engine_inputs.html">   64</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_nano_engine_inputs.html">NanoEngineInputs</a></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;{</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_nano_engine_inputs.html#a0235b5b7094b0ca2e75214e0d808e3ba">   70</a></span>&#160;    <a class="code" href="class_nano_engine_inputs.html#a0235b5b7094b0ca2e75214e0d808e3ba">NanoEngineInputs</a>() {};</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_nano_engine_inputs.html#aaf992076a4c0e1a5aa95a9e129e8ad25">pressed</a>(uint8_t buttons);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_nano_engine_inputs.html#aeaf2995c49b0256b18412ef38dd0891e">notPressed</a>(uint8_t buttons);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="class_nano_engine_inputs.html#aedfff4527abdc43040de2696243616cd">   96</a></span>&#160;    <span class="keyword">static</span> uint8_t <a class="code" href="class_nano_engine_inputs.html#aedfff4527abdc43040de2696243616cd">buttonsState</a>()</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    {</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_nano_engine_inputs.html#a8c619be0d57a15ed98680ba1fb5e58a6">m_onButtons</a>();</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_nano_engine_inputs.html#a7f509d896a9b9d1c523ac87f459f5686">connectCustomKeys</a>(<a class="code" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">TNanoEngineGetButtons</a> handler);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_nano_engine_inputs.html#a4b438315ca118e0721e3a8fb2f638e41">connectZKeypad</a>(uint8_t analogPin);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_nano_engine_inputs.html#a44834200b3dd49442b96ea45de2aaf56">connectArduboyKeys</a>();</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="preprocessor">#ifndef DOXYGEN_SHOULD_SKIP_THIS</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> connectKY40encoder(uint8_t pina_clk, uint8_t pinb_dt, int8_t pinc_sw = -1);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_nano_engine_inputs.html#a1ce0b8a1b37e2c80ae837105e7398e78">connectGpioKeypad</a>(<span class="keyword">const</span> uint8_t *gpioKeys);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_nano_engine_inputs.html#a8c619be0d57a15ed98680ba1fb5e58a6">  149</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">TNanoEngineGetButtons</a> <a class="code" href="class_nano_engine_inputs.html#a8c619be0d57a15ed98680ba1fb5e58a6">m_onButtons</a>;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">static</span> uint8_t s_zkeypadPin;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t * s_gpioKeypadPins;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keyword">static</span> uint8_t s_ky40_clk;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">static</span> uint8_t s_ky40_dt;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keyword">static</span> uint8_t s_ky40_sw;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keyword">static</span> uint8_t zkeypadButtons();</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keyword">static</span> uint8_t arduboyButtons();</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keyword">static</span> uint8_t gpioButtons();</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keyword">static</span> uint8_t ky40Buttons();</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;};</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html">  171</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_nano_engine_core.html">NanoEngineCore</a>: <span class="keyword">public</span> <a class="code" href="class_nano_engine_inputs.html">NanoEngineInputs</a></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;{</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="class_nano_engine_core.html">NanoEngineCore</a>(): <a class="code" href="class_nano_engine_inputs.html#a0235b5b7094b0ca2e75214e0d808e3ba">NanoEngineInputs</a>() {};</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> begin();</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> setFrameRate(uint8_t fps);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a6cc892046d837463ed7c3996baa983b5">  191</a></span>&#160;    <span class="keyword">static</span> uint8_t <a class="code" href="class_nano_engine_core.html#a6cc892046d837463ed7c3996baa983b5">getFrameRate</a>() { <span class="keywordflow">return</span> m_fps; };</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a249ba97c3cff086d9837d014546867c0">  199</a></span>&#160;    <span class="keyword">static</span> uint8_t <a class="code" href="class_nano_engine_core.html#a249ba97c3cff086d9837d014546867c0">getCpuLoad</a>() { <span class="keywordflow">return</span> m_cpuLoad; };</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> nextFrame();</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a22077f2a0f1ea7c897dbec7e1878d3a8">  210</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> loopCallback(<a class="code" href="core_8h.html#a9f670b824fb6b10883cd4283f800310f">TLoopCallback</a> callback) { m_loop = callback; };</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keyword">static</span> uint8_t   <a class="code" href="class_nano_engine_core.html#a22077f2a0f1ea7c897dbec7e1878d3a8">m_frameDurationMs</a>;</div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a451151896bbd7e586e5f5970487bccb8">  217</a></span>&#160;    <span class="keyword">static</span> uint8_t   <a class="code" href="class_nano_engine_core.html#a451151896bbd7e586e5f5970487bccb8">m_fps</a>;</div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a03092e366bf50606308bd065d6de9623">  219</a></span>&#160;    <span class="keyword">static</span> uint8_t   <a class="code" href="class_nano_engine_core.html#a03092e366bf50606308bd065d6de9623">m_cpuLoad</a>;</div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">  221</a></span>&#160;    <span class="keyword">static</span> uint32_t  <a class="code" href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">m_lastFrameTs</a>;</div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="class_nano_engine_core.html#a9754b6af8f57a00416094b1f0e551298">  223</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="core_8h.html#a9f670b824fb6b10883cd4283f800310f">TLoopCallback</a> <a class="code" href="class_nano_engine_core.html#a9754b6af8f57a00416094b1f0e551298">m_loop</a>;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;};</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> C, u<span class="keywordtype">int</span>8_t W, u<span class="keywordtype">int</span>8_t H, u<span class="keywordtype">int</span>8_t B&gt;</div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="class_nano_engine.html">  230</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_nano_engine.html">NanoEngine</a>: <span class="keyword">public</span> <a class="code" href="class_nano_engine_core.html">NanoEngineCore</a>,</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                  <span class="keyword">public</span> <a class="code" href="class_nano_engine_tiler.html">NanoEngineTiler</a>&lt;C,W,H,B&gt;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;{</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <a class="code" href="class_nano_engine.html">NanoEngine</a>();</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> display();</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> begin();</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> notify(<span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;};</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> C, u<span class="keywordtype">int</span>8_t W, u<span class="keywordtype">int</span>8_t H, u<span class="keywordtype">int</span>8_t B&gt;</div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="class_nano_engine.html#a065b5b10f1e8e50698fbb1814623062f">  264</a></span>&#160;<a class="code" href="class_nano_engine.html#a065b5b10f1e8e50698fbb1814623062f">NanoEngine&lt;C,W,H,B&gt;::NanoEngine</a>()</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    : <a class="code" href="class_nano_engine_core.html">NanoEngineCore</a>(), <a class="code" href="class_nano_engine_tiler.html">NanoEngineTiler</a>&lt;C,W,H,B&gt;()</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;{</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;}</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> C, u<span class="keywordtype">int</span>8_t W, u<span class="keywordtype">int</span>8_t H, u<span class="keywordtype">int</span>8_t B&gt;</div><div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="class_nano_engine.html#aa62679199db111eeaf01a4235c72ecd0">  270</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_nano_engine.html#aa62679199db111eeaf01a4235c72ecd0">NanoEngine&lt;C,W,H,B&gt;::display</a>()</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;{</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <a class="code" href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">m_lastFrameTs</a> = millis();</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="class_nano_engine_tiler.html#a6f7ba05a46f9033d548390d5c8107110">NanoEngineTiler&lt;C,W,H,B&gt;::displayBuffer</a>();</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <a class="code" href="class_nano_engine_core.html#a03092e366bf50606308bd065d6de9623">m_cpuLoad</a> = ((millis() - <a class="code" href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">m_lastFrameTs</a>)*100)/<a class="code" href="class_nano_engine_core.html#a22077f2a0f1ea7c897dbec7e1878d3a8">m_frameDurationMs</a>;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;}</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> C, u<span class="keywordtype">int</span>8_t W, u<span class="keywordtype">int</span>8_t H, u<span class="keywordtype">int</span>8_t B&gt;</div><div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="class_nano_engine.html#a7d6f3bad4c4abfc0c98a047a9a1600ae">  278</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_nano_engine.html#a7d6f3bad4c4abfc0c98a047a9a1600ae">NanoEngine&lt;C,W,H,B&gt;::begin</a>()</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;{</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <a class="code" href="class_nano_engine_core.html#a81e23ad6be365c1ad82e3b5751158500">NanoEngineCore::begin</a>();</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <span class="keywordflow">if</span> (C::BITS_PER_PIXEL &gt; 1)</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    {</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <a class="code" href="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i.html#ga34699d9f6192c375a6b40d4414502d41">ssd1306_setMode</a>(<a class="code" href="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i.html#ggad2c71a26fa32dfcee88db3a3058ce596afa76104458f5903f6b3083d2805d9432">LCD_MODE_NORMAL</a>);</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    }</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;}</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> C, u<span class="keywordtype">int</span>8_t W, u<span class="keywordtype">int</span>8_t H, u<span class="keywordtype">int</span>8_t B&gt;</div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="class_nano_engine.html#acda55904927fb0159c44313a643cfd15">  288</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_nano_engine.html#acda55904927fb0159c44313a643cfd15">NanoEngine&lt;C,W,H,B&gt;::notify</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str)</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;{</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <a class="code" href="class_nano_engine_tiler.html#ac9642cbeff5b4de207b379d4bbb07ba8">NanoEngineTiler&lt;C,W,H,B&gt;::displayPopup</a>(str);</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    delay(1000);</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">m_lastFrameTs</a> = millis();</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <a class="code" href="class_nano_engine_tiler.html#a0fe7b834cc4900820adf06a62259f53b">NanoEngineTiler&lt;C,W,H,B&gt;::refresh</a>();</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;}</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div><div class="ttc" id="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i_html_ga34699d9f6192c375a6b40d4414502d41"><div class="ttname"><a href="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i.html#ga34699d9f6192c375a6b40d4414502d41">ssd1306_setMode</a></div><div class="ttdeci">void ssd1306_setMode(lcd_mode_t mode)</div><div class="ttdoc">Sets library display mode for direct draw functions. </div><div class="ttdef"><b>Definition:</b> <a href="lcd__common_8c_source.html#l00131">lcd_common.c:131</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html"><div class="ttname"><a href="class_nano_engine_inputs.html">NanoEngineInputs</a></div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00064">core.h:64</a></div></div>
<div class="ttc" id="core_8h_html_a9f670b824fb6b10883cd4283f800310f"><div class="ttname"><a href="core_8h.html#a9f670b824fb6b10883cd4283f800310f">TLoopCallback</a></div><div class="ttdeci">void(* TLoopCallback)(void)</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00044">core.h:44</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_a9754b6af8f57a00416094b1f0e551298"><div class="ttname"><a href="class_nano_engine_core.html#a9754b6af8f57a00416094b1f0e551298">NanoEngineCore::m_loop</a></div><div class="ttdeci">static TLoopCallback m_loop</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00223">core.h:223</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a4b438315ca118e0721e3a8fb2f638e41"><div class="ttname"><a href="class_nano_engine_inputs.html#a4b438315ca118e0721e3a8fb2f638e41">NanoEngineInputs::connectZKeypad</a></div><div class="ttdeci">static void connectZKeypad(uint8_t analogPin)</div><div class="ttdoc">Enables engine to use Z-Keypad. Enables engine to use Z-Keypad. Please refer to arkanoid example for ...</div></div>
<div class="ttc" id="class_nano_engine_html"><div class="ttname"><a href="class_nano_engine.html">NanoEngine</a></div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00230">core.h:230</a></div></div>
<div class="ttc" id="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i_html_ggad2c71a26fa32dfcee88db3a3058ce596afa76104458f5903f6b3083d2805d9432"><div class="ttname"><a href="group___l_c_d___i_n_t_e_r_f_a_c_e___a_p_i.html#ggad2c71a26fa32dfcee88db3a3058ce596afa76104458f5903f6b3083d2805d9432">LCD_MODE_NORMAL</a></div><div class="ttdef"><b>Definition:</b> <a href="lcd__common_8h_source.html#l00075">lcd_common.h:75</a></div></div>
<div class="ttc" id="class_nano_engine_core_html"><div class="ttname"><a href="class_nano_engine_core.html">NanoEngineCore</a></div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00171">core.h:171</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a44834200b3dd49442b96ea45de2aaf56"><div class="ttname"><a href="class_nano_engine_inputs.html#a44834200b3dd49442b96ea45de2aaf56">NanoEngineInputs::connectArduboyKeys</a></div><div class="ttdeci">static void connectArduboyKeys()</div><div class="ttdoc">Configures NanoEngine8 to use Arduboy keys layout. Configures NanoEngine8 to use Arduboy keys layout...</div></div>
<div class="ttc" id="class_nano_engine_inputs_html_aaf992076a4c0e1a5aa95a9e129e8ad25"><div class="ttname"><a href="class_nano_engine_inputs.html#aaf992076a4c0e1a5aa95a9e129e8ad25">NanoEngineInputs::pressed</a></div><div class="ttdeci">static bool pressed(uint8_t buttons)</div><div class="ttdoc">Returns true if button or specific combination of buttons is not pressed. Returns true if button or s...</div></div>
<div class="ttc" id="class_nano_engine_core_html_a451151896bbd7e586e5f5970487bccb8"><div class="ttname"><a href="class_nano_engine_core.html#a451151896bbd7e586e5f5970487bccb8">NanoEngineCore::m_fps</a></div><div class="ttdeci">static uint8_t m_fps</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00217">core.h:217</a></div></div>
<div class="ttc" id="class_nano_engine_tiler_html_a0fe7b834cc4900820adf06a62259f53b"><div class="ttname"><a href="class_nano_engine_tiler.html#a0fe7b834cc4900820adf06a62259f53b">NanoEngineTiler::refresh</a></div><div class="ttdeci">static void refresh()</div><div class="ttdef"><b>Definition:</b> <a href="tiler_8h_source.html#l00105">tiler.h:105</a></div></div>
<div class="ttc" id="canvas_8h_html"><div class="ttname"><a href="canvas_8h.html">canvas.h</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a7f509d896a9b9d1c523ac87f459f5686"><div class="ttname"><a href="class_nano_engine_inputs.html#a7f509d896a9b9d1c523ac87f459f5686">NanoEngineInputs::connectCustomKeys</a></div><div class="ttdeci">static void connectCustomKeys(TNanoEngineGetButtons handler)</div></div>
<div class="ttc" id="class_nano_engine_html_a7d6f3bad4c4abfc0c98a047a9a1600ae"><div class="ttname"><a href="class_nano_engine.html#a7d6f3bad4c4abfc0c98a047a9a1600ae">NanoEngine::begin</a></div><div class="ttdeci">static void begin()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00278">core.h:278</a></div></div>
<div class="ttc" id="group___n_a_n_o___e_n_g_i_n_e___a_p_i_html_gaff4934f12cf7a86959c46e57aac5ae5d"><div class="ttname"><a href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">TNanoEngineGetButtons</a></div><div class="ttdeci">uint8_t(* TNanoEngineGetButtons)(void)</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00041">core.h:41</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_a81e23ad6be365c1ad82e3b5751158500"><div class="ttname"><a href="class_nano_engine_core.html#a81e23ad6be365c1ad82e3b5751158500">NanoEngineCore::begin</a></div><div class="ttdeci">static void begin()</div></div>
<div class="ttc" id="class_nano_engine_core_html_a03092e366bf50606308bd065d6de9623"><div class="ttname"><a href="class_nano_engine_core.html#a03092e366bf50606308bd065d6de9623">NanoEngineCore::m_cpuLoad</a></div><div class="ttdeci">static uint8_t m_cpuLoad</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00219">core.h:219</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_afd38c03005b3612e92045d2ee574166c"><div class="ttname"><a href="class_nano_engine_core.html#afd38c03005b3612e92045d2ee574166c">NanoEngineCore::m_lastFrameTs</a></div><div class="ttdeci">static uint32_t m_lastFrameTs</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00221">core.h:221</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_aedfff4527abdc43040de2696243616cd"><div class="ttname"><a href="class_nano_engine_inputs.html#aedfff4527abdc43040de2696243616cd">NanoEngineInputs::buttonsState</a></div><div class="ttdeci">static uint8_t buttonsState()</div><div class="ttdoc">Returns bits of all pressed buttons. </div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00096">core.h:96</a></div></div>
<div class="ttc" id="class_nano_engine_tiler_html"><div class="ttname"><a href="class_nano_engine_tiler.html">NanoEngineTiler</a></div><div class="ttdef"><b>Definition:</b> <a href="tiler_8h_source.html#l00080">tiler.h:80</a></div></div>
<div class="ttc" id="class_nano_engine_html_a065b5b10f1e8e50698fbb1814623062f"><div class="ttname"><a href="class_nano_engine.html#a065b5b10f1e8e50698fbb1814623062f">NanoEngine::NanoEngine</a></div><div class="ttdeci">NanoEngine()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00264">core.h:264</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_a6cc892046d837463ed7c3996baa983b5"><div class="ttname"><a href="class_nano_engine_core.html#a6cc892046d837463ed7c3996baa983b5">NanoEngineCore::getFrameRate</a></div><div class="ttdeci">static uint8_t getFrameRate()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00191">core.h:191</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_a249ba97c3cff086d9837d014546867c0"><div class="ttname"><a href="class_nano_engine_core.html#a249ba97c3cff086d9837d014546867c0">NanoEngineCore::getCpuLoad</a></div><div class="ttdeci">static uint8_t getCpuLoad()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00199">core.h:199</a></div></div>
<div class="ttc" id="class_nano_engine_tiler_html_a6f7ba05a46f9033d548390d5c8107110"><div class="ttname"><a href="class_nano_engine_tiler.html#a6f7ba05a46f9033d548390d5c8107110">NanoEngineTiler::displayBuffer</a></div><div class="ttdeci">static void displayBuffer()</div><div class="ttdoc">refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...</div><div class="ttdef"><b>Definition:</b> <a href="tiler_8h_source.html#l00301">tiler.h:301</a></div></div>
<div class="ttc" id="class_nano_engine_tiler_html_ac9642cbeff5b4de207b379d4bbb07ba8"><div class="ttname"><a href="class_nano_engine_tiler.html#ac9642cbeff5b4de207b379d4bbb07ba8">NanoEngineTiler::displayPopup</a></div><div class="ttdeci">static void displayPopup(const char *msg)</div><div class="ttdoc">prints popup message over display content prints popup message over display content ...</div><div class="ttdef"><b>Definition:</b> <a href="tiler_8h_source.html#l00329">tiler.h:329</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_aeaf2995c49b0256b18412ef38dd0891e"><div class="ttname"><a href="class_nano_engine_inputs.html#aeaf2995c49b0256b18412ef38dd0891e">NanoEngineInputs::notPressed</a></div><div class="ttdeci">static bool notPressed(uint8_t buttons)</div><div class="ttdoc">Returns true if button or specific combination of buttons is not pressed. Returns true if button or s...</div></div>
<div class="ttc" id="class_nano_engine_html_acda55904927fb0159c44313a643cfd15"><div class="ttname"><a href="class_nano_engine.html#acda55904927fb0159c44313a643cfd15">NanoEngine::notify</a></div><div class="ttdeci">static void notify(const char *str)</div><div class="ttdoc">shows notification to a user for 1 seconds Shows notification to a user for 1 seconds ...</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00288">core.h:288</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a0235b5b7094b0ca2e75214e0d808e3ba"><div class="ttname"><a href="class_nano_engine_inputs.html#a0235b5b7094b0ca2e75214e0d808e3ba">NanoEngineInputs::NanoEngineInputs</a></div><div class="ttdeci">NanoEngineInputs()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00070">core.h:70</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a1ce0b8a1b37e2c80ae837105e7398e78"><div class="ttname"><a href="class_nano_engine_inputs.html#a1ce0b8a1b37e2c80ae837105e7398e78">NanoEngineInputs::connectGpioKeypad</a></div><div class="ttdeci">static void connectGpioKeypad(const uint8_t *gpioKeys)</div><div class="ttdoc">Enables engine to use GPIO keys. </div></div>
<div class="ttc" id="tiler_8h_html"><div class="ttname"><a href="tiler_8h.html">tiler.h</a></div></div>
<div class="ttc" id="class_nano_engine_core_html_a22077f2a0f1ea7c897dbec7e1878d3a8"><div class="ttname"><a href="class_nano_engine_core.html#a22077f2a0f1ea7c897dbec7e1878d3a8">NanoEngineCore::m_frameDurationMs</a></div><div class="ttdeci">static uint8_t m_frameDurationMs</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00210">core.h:210</a></div></div>
<div class="ttc" id="class_nano_engine_html_aa62679199db111eeaf01a4235c72ecd0"><div class="ttname"><a href="class_nano_engine.html#aa62679199db111eeaf01a4235c72ecd0">NanoEngine::display</a></div><div class="ttdeci">static void display()</div><div class="ttdoc">refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00270">core.h:270</a></div></div>
<div class="ttc" id="class_nano_engine_inputs_html_a8c619be0d57a15ed98680ba1fb5e58a6"><div class="ttname"><a href="class_nano_engine_inputs.html#a8c619be0d57a15ed98680ba1fb5e58a6">NanoEngineInputs::m_onButtons</a></div><div class="ttdeci">static TNanoEngineGetButtons m_onButtons</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00149">core.h:149</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
